package com.yunji.framework_template.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yunji.framework_template.biz.service.HystrixService;
import com.yunji.framework_template.common.web.Result;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@Controller
@RequestMapping("/hystrixController/")
public class HystrixController {
	@Autowired
	private HystrixService hystrixService;
	
	@RequestMapping("test")
    @ResponseBody
    public Result<Integer> testHystrix(Integer number) {
		return Result.success(hystrixService.hystrixDemoMethod(number));
	}
}
